From: Mike McClurg Date: Tue, 21 Jun 2011 17:01:51 +0000 (+0100) Subject: tools/ocaml: ask compiler for correct library X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10131^2~10 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=bec8caf43bb0949cea5930f6b3b74a2abf1b4486;p=xen.git tools/ocaml: ask compiler for correct library OCaml libraries will live in /usr/local/ if the user compiles OCaml from source. This patch asks the OCaml compiler where we should look for libraries. NB: it may be that we should do the same thing for the NetBSD case, but I don't have a BSD box to test this out. Signed-off-by: Mike McClurg Signed-off-by: Ian Jackson Committed-by: Ian Jackson --- diff --git a/tools/ocaml/common.make b/tools/ocaml/common.make index 04a0b6b1ff..17a300c807 100644 --- a/tools/ocaml/common.make +++ b/tools/ocaml/common.make @@ -9,7 +9,7 @@ OCAMLLEX ?= ocamllex OCAMLYACC ?= ocamlyacc CFLAGS += -fPIC -Werror -CFLAGS-$(CONFIG_Linux) += -I/usr/lib64/ocaml -I/usr/lib/ocaml +CFLAGS-$(CONFIG_Linux) += -I$(shell ocamlc -where) CFLAGS-$(CONFIG_NetBSD) += -I/usr/pkg/lib/ocaml -fPIC OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n 's/^ *\(-g\) .*/\1/p')